package com.libraryManage.service;

import com.libraryManage.commons.utils.ResponseEntity;
import com.libraryManage.commons.utils.SimpleResp;
import com.libraryManage.entity.BorrowDo;
import com.libraryManage.entity.BorrowingUser;
import com.libraryManage.vo.BorrowVo;

import java.util.List;

/**
 * @author:ZhangQing
 * @Date:2020/11/4
 */
public interface BorrowService {
    ResponseEntity<List<BorrowDo>> getAllBorrow();

    BorrowDo getBorrowById(Integer s);

    SimpleResp insertBorrow(BorrowVo borrowVo);

    /**
     * 查询借阅记录
     * @param vo
     * @return
     */
    ResponseEntity<List<BorrowVo>> getList(BorrowVo vo);

    /**
     * 获取未处理预约借阅列表
     * @param borrowingUser
     * @return
     */
    ResponseEntity<List<BorrowingUser>> getBorrowingUser(BorrowingUser borrowingUser);

    /**
     * 处理预约借阅
     * @param userId
     * @param borrowingState
     * @return
     */
    ResponseEntity<List<BorrowingUser>> updateBorrowingState(int userId, int bookId, int borrowingState);
}
